package com.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UserController extends AbstractController {
    /*
     * MVC架构：servlet,Spring Mvc，status3
     *   M:model——>应用管理层：数据业务支持
     *   V:view-->视图层 jsp：数据视图的渲染
     *   C:controller:控制器层：负责接收和响应请求
     * */

    //适配器
    protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        //业务代码
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("name","lisi");
        modelAndView.setViewName("welcome");
        return modelAndView;
    }



}
